package com.sxjh.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author zixin
 * @since 2021-07-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("users")
@ApiModel(value="Users对象", description="用户表")
public class Users implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "账号")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    @TableField("email_verified_at")
    private LocalDateTime emailVerifiedAt;

    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    @TableField("remember_token")
    private String rememberToken;

    @ApiModelProperty(value = "用户类型【1:内部用户;2:供应商;3:物流公司;】")
    @TableField("user_type")
    private Integer userType;

    @ApiModelProperty(value = "用户状态【1:正常;0:禁用】")
    @TableField("user_status")
    private Boolean userStatus;

    @ApiModelProperty(value = "供应商/客户名称")
    @TableField("company_name")
    private String companyName;

    @TableField("customer_credit")
    private BigDecimal customerCredit;

    @ApiModelProperty(value = "供应商ID")
    @TableField("supplier_id")
    private Integer supplierId;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.UPDATE)
    private LocalDateTime updatedAt;


}
